3.2.35 \(\int x^3 (a+b \tanh ^{-1}(\frac {c}{x})) \, dx\) [135]

Optimal. Leaf size=50 \[ \frac {1}{4} b c^3 x+\frac {1}{12} b c x^3+\frac {1}{4} x^4 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right )-\frac {1}{4} b c^4 \tanh ^{-1}\left (\frac {x}{c}\right ) \]

[Out]

1/4*b*c^3*x+1/12*b*c*x^3+1/4*x^4*(a+b*arctanh(c/x))-1/4*b*c^4*arctanh(x/c)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {6037, 269, 308, 213} \begin {gather*} \frac {1}{4} x^4 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right )-\frac {1}{4} b c^4 \tanh ^{-1}\left (\frac {x}{c}\right )+\frac {1}{4} b c^3 x+\frac {1}{12} b c x^3 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^3*(a + b*ArcTanh[c/x]),x]

[Out]

(b*c^3*x)/4 + (b*c*x^3)/12 + (x^4*(a + b*ArcTanh[c/x]))/4 - (b*c^4*ArcTanh[x/c])/4

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 269

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 308

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 6037

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTanh[c*
x^n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))
), x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1
]

Rubi steps

\begin {align*} \int x^3 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right ) \, dx &=\frac {1}{4} x^4 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right )+\frac {1}{4} (b c) \int \frac {x^2}{1-\frac {c^2}{x^2}} \, dx\\ &=\frac {1}{4} x^4 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right )+\frac {1}{4} (b c) \int \frac {x^4}{-c^2+x^2} \, dx\\ &=\frac {1}{4} x^4 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right )+\frac {1}{4} (b c) \int \left (c^2+x^2+\frac {c^4}{-c^2+x^2}\right ) \, dx\\ &=\frac {1}{4} b c^3 x+\frac {1}{12} b c x^3+\frac {1}{4} x^4 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right )+\frac {1}{4} \left (b c^5\right ) \int \frac {1}{-c^2+x^2} \, dx\\ &=\frac {1}{4} b c^3 x+\frac {1}{12} b c x^3+\frac {1}{4} x^4 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right )-\frac {1}{4} b c^4 \tanh ^{-1}\left (\frac {x}{c}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 67, normalized size = 1.34 \begin {gather*} \frac {1}{4} b c^3 x+\frac {1}{12} b c x^3+\frac {a x^4}{4}+\frac {1}{4} b x^4 \tanh ^{-1}\left (\frac {c}{x}\right )+\frac {1}{8} b c^4 \log (-c+x)-\frac {1}{8} b c^4 \log (c+x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^3*(a + b*ArcTanh[c/x]),x]

[Out]

(b*c^3*x)/4 + (b*c*x^3)/12 + (a*x^4)/4 + (b*x^4*ArcTanh[c/x])/4 + (b*c^4*Log[-c + x])/8 - (b*c^4*Log[c + x])/8

________________________________________________________________________________________

Maple [A]
time = 0.20, size = 69, normalized size = 1.38

method result size
derivativedivides \(-c^{4} \left (-\frac {a \,x^{4}}{4 c^{4}}-\frac {b \,x^{4} \arctanh \left (\frac {c}{x}\right )}{4 c^{4}}+\frac {b \ln \left (1+\frac {c}{x}\right )}{8}-\frac {b \,x^{3}}{12 c^{3}}-\frac {b x}{4 c}-\frac {b \ln \left (\frac {c}{x}-1\right )}{8}\right )\) \(69\)
default \(-c^{4} \left (-\frac {a \,x^{4}}{4 c^{4}}-\frac {b \,x^{4} \arctanh \left (\frac {c}{x}\right )}{4 c^{4}}+\frac {b \ln \left (1+\frac {c}{x}\right )}{8}-\frac {b \,x^{3}}{12 c^{3}}-\frac {b x}{4 c}-\frac {b \ln \left (\frac {c}{x}-1\right )}{8}\right )\) \(69\)
risch \(\frac {x^{4} b \ln \left (x +c \right )}{8}-\frac {x^{4} b \ln \left (c -x \right )}{8}-\frac {i \pi b \,x^{4}}{8}-\frac {i \pi b \,x^{4} \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )^{3}}{16}+\frac {i \pi b \,x^{4} \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{2}}{8}-\frac {i \pi b \,x^{4} \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{3}}{16}-\frac {i \pi b \,x^{4} \mathrm {csgn}\left (i \left (c -x \right )\right ) \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{2}}{16}-\frac {i \pi b \,x^{4} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{2}}{16}-\frac {i \pi b \,x^{4} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (x +c \right )\right ) \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )}{16}+\frac {i \pi b \,x^{4} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (c -x \right )\right ) \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )}{16}+\frac {i \pi b \,x^{4} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )^{2}}{16}+\frac {i \pi b \,x^{4} \mathrm {csgn}\left (i \left (x +c \right )\right ) \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )^{2}}{16}+\frac {x^{4} a}{4}+\frac {b \,c^{3} x}{4}+\frac {b c \,x^{3}}{12}-\frac {b \,c^{4} \ln \left (x +c \right )}{8}+\frac {b \,c^{4} \ln \left (x -c \right )}{8}\) \(320\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(a+b*arctanh(c/x)),x,method=_RETURNVERBOSE)

[Out]

-c^4*(-1/4*a/c^4*x^4-1/4*b/c^4*x^4*arctanh(c/x)+1/8*b*ln(1+c/x)-1/12*b*x^3/c^3-1/4*b*x/c-1/8*b*ln(c/x-1))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 57, normalized size = 1.14 \begin {gather*} \frac {1}{4} \, a x^{4} + \frac {1}{24} \, {\left (6 \, x^{4} \operatorname {artanh}\left (\frac {c}{x}\right ) - {\left (3 \, c^{3} \log \left (c + x\right ) - 3 \, c^{3} \log \left (-c + x\right ) - 6 \, c^{2} x - 2 \, x^{3}\right )} c\right )} b \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*arctanh(c/x)),x, algorithm="maxima")

[Out]

1/4*a*x^4 + 1/24*(6*x^4*arctanh(c/x) - (3*c^3*log(c + x) - 3*c^3*log(-c + x) - 6*c^2*x - 2*x^3)*c)*b

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 48, normalized size = 0.96 \begin {gather*} \frac {1}{4} \, b c^{3} x + \frac {1}{12} \, b c x^{3} + \frac {1}{4} \, a x^{4} - \frac {1}{8} \, {\left (b c^{4} - b x^{4}\right )} \log \left (-\frac {c + x}{c - x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*arctanh(c/x)),x, algorithm="fricas")

[Out]

1/4*b*c^3*x + 1/12*b*c*x^3 + 1/4*a*x^4 - 1/8*(b*c^4 - b*x^4)*log(-(c + x)/(c - x))

________________________________________________________________________________________

Sympy [A]
time = 0.16, size = 46, normalized size = 0.92 \begin {gather*} \frac {a x^{4}}{4} - \frac {b c^{4} \operatorname {atanh}{\left (\frac {c}{x} \right )}}{4} + \frac {b c^{3} x}{4} + \frac {b c x^{3}}{12} + \frac {b x^{4} \operatorname {atanh}{\left (\frac {c}{x} \right )}}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**3*(a+b*atanh(c/x)),x)

[Out]

a*x**4/4 - b*c**4*atanh(c/x)/4 + b*c**3*x/4 + b*c*x**3/12 + b*x**4*atanh(c/x)/4

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 262 vs. \(2 (42) = 84\).
time = 0.43, size = 262, normalized size = 5.24 \begin {gather*} -\frac {\frac {3 \, {\left (\frac {b {\left (c + x\right )}^{3} c^{5}}{{\left (c - x\right )}^{3}} + \frac {b {\left (c + x\right )} c^{5}}{c - x}\right )} \log \left (-\frac {c + x}{c - x}\right )}{\frac {{\left (c + x\right )}^{4}}{{\left (c - x\right )}^{4}} + \frac {4 \, {\left (c + x\right )}^{3}}{{\left (c - x\right )}^{3}} + \frac {6 \, {\left (c + x\right )}^{2}}{{\left (c - x\right )}^{2}} + \frac {4 \, {\left (c + x\right )}}{c - x} + 1} + \frac {2 \, b c^{5} + \frac {6 \, a {\left (c + x\right )}^{3} c^{5}}{{\left (c - x\right )}^{3}} + \frac {3 \, b {\left (c + x\right )}^{3} c^{5}}{{\left (c - x\right )}^{3}} + \frac {6 \, b {\left (c + x\right )}^{2} c^{5}}{{\left (c - x\right )}^{2}} + \frac {6 \, a {\left (c + x\right )} c^{5}}{c - x} + \frac {5 \, b {\left (c + x\right )} c^{5}}{c - x}}{\frac {{\left (c + x\right )}^{4}}{{\left (c - x\right )}^{4}} + \frac {4 \, {\left (c + x\right )}^{3}}{{\left (c - x\right )}^{3}} + \frac {6 \, {\left (c + x\right )}^{2}}{{\left (c - x\right )}^{2}} + \frac {4 \, {\left (c + x\right )}}{c - x} + 1}}{3 \, c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*arctanh(c/x)),x, algorithm="giac")

[Out]

-1/3*(3*(b*(c + x)^3*c^5/(c - x)^3 + b*(c + x)*c^5/(c - x))*log(-(c + x)/(c - x))/((c + x)^4/(c - x)^4 + 4*(c
+ x)^3/(c - x)^3 + 6*(c + x)^2/(c - x)^2 + 4*(c + x)/(c - x) + 1) + (2*b*c^5 + 6*a*(c + x)^3*c^5/(c - x)^3 + 3
*b*(c + x)^3*c^5/(c - x)^3 + 6*b*(c + x)^2*c^5/(c - x)^2 + 6*a*(c + x)*c^5/(c - x) + 5*b*(c + x)*c^5/(c - x))/
((c + x)^4/(c - x)^4 + 4*(c + x)^3/(c - x)^3 + 6*(c + x)^2/(c - x)^2 + 4*(c + x)/(c - x) + 1))/c

________________________________________________________________________________________

Mupad [B]
time = 0.78, size = 45, normalized size = 0.90 \begin {gather*} \frac {a\,x^4}{4}-\frac {b\,c^4\,\mathrm {atanh}\left (\frac {c}{x}\right )}{4}+\frac {b\,x^4\,\mathrm {atanh}\left (\frac {c}{x}\right )}{4}+\frac {b\,c\,x^3}{12}+\frac {b\,c^3\,x}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(a + b*atanh(c/x)),x)

[Out]

(a*x^4)/4 - (b*c^4*atanh(c/x))/4 + (b*x^4*atanh(c/x))/4 + (b*c*x^3)/12 + (b*c^3*x)/4

________________________________________________________________________________________